package com.ycp.erp.main.binder;

import com.one.common.utils.StringUtils;
import com.one.common.view.multitytype.adapter.BaseItemBinder;
import com.one.common.view.multitytype.adapter.BaseViewHolderMulti;
import com.ycp.erp.R;
import com.ycp.erp.main.model.bean.WarehouseRecord;

import androidx.annotation.NonNull;

/**
 * Class Des:
 * Created by bjh on 2021/9/2.
 */
public class MoveWarehouseRecordBinder extends BaseItemBinder<WarehouseRecord> {
    public MoveWarehouseRecordBinder() {
        super(R.layout.item_move_warehouse_record);
    }

    @Override
    protected void bindView(@NonNull BaseViewHolderMulti holder, @NonNull WarehouseRecord item) {
        holder.setText(R.id.tvFromWarehouseName,item.getFromWarehouseName());
        holder.setText(R.id.tvToWarehouseName,item.getToWarehouseName());
        holder.setText(R.id.tvGoodsNum,item.getGoodsNum());
        holder.setText(R.id.tvDate,item.getDate());
        holder.setText(R.id.tvAccount,item.getAccount());
        if (StringUtils.isBlank(item.getRemark())){
            holder.setText(R.id.tvRemarks,"无备注信息");
        }else {
            holder.setText(R.id.tvRemarks,item.getRemark());
        }


    }
}
